<template>
	<view>
		<view class="list_a" v-if="info">
			<image class="a_img" :src="url+'/image/back.png'" mode=""></image>
			<view class="list_a_a">
				<view class="dis_f_sb_c" style="margin-top: 112rpx;">
					<view class="dis_f_l_c">
						<image class="tx_img" :src="info.avatar" mode=""></image>
						<view class="a_text">
							<view class="black_f_32 font_w_bold">{{info.trade_name}}</view>
							<view class="dis_f_l_c" style="margin-top: 8rpx;">
								<view>
									<u-rate readonly size="12" gutter="1" activeColor="#FF6401" inactiveColor="#F7FAFF"
										allowHalf :count="count" v-model="info.star"></u-rate>
								</view>
								<view class="orange_f_24" style="margin-left: 6rpx;">{{info.star}}</view>
							</view>
						</view>
					</view>
					<image @click="go_view('/pages-2/wd_sz/wd_sz')" class="sz_img" :src="url+'/image/shezhi.png'"
						mode=""></image>
				</view>
				<view class="liat_a_b">
					<view class="dis_f_co_c_c">
						<view class="black_f_32">{{info.my_assets}}</view>
						<view class="grey_f_24 mar_top">我的资产(元)</view>
					</view>
					<view class="dis_f_co_c_c">
						<view class="black_f_32">{{info.withdrawable}}</view>
						<view class="grey_f_24 mar_top">可提现(元)</view>
					</view>
					<view class="dis_f_co_c_c">
						<view class="black_f_32">{{info.withdrawn}}</view>
						<view class="grey_f_24 mar_top">已提现(元)</view>
					</view>
				</view>
			</view>
		</view>
		<view class="list_b">
			<view class="list_b_a">
				<view class="list_b_title dis_f_sb_c">
					<view class="dis_f_l_c">
						<view class="xian back_blue"></view>
						<view class="black_f_32">数据统计</view>
					</view>
					<view class="dis_f_r_c" @click="go_view('/pages-2/wd_lb/sj_tj')">
						<view class="grey_f_28">查看全部</view>
						<image class="r_img" :src="url+'/image/right.png'" mode=""></image>
					</view>
				</view>
				<view class="back list_b_bo">
					<view class="dis_f_co_c_c bo_w">
						<view class="black_f_36">{{info.todays_earnings}}</view>
						<view class="grey_f_24 mar_top">今日收益(元)</view>
					</view>
					<view class="dis_f_co_c_c bo_w">
						<view class="black_f_36">{{info.todays_num}}</view>
						<view class="grey_f_24 mar_top">今日订单(笔)</view>
					</view>
					<view class="dis_f_co_c_c bo_w">
						<view class="black_f_36">{{info.to_be_credited}}</view>
						<view class="grey_f_24 mar_top">待入账(元)</view>
					</view>
					<view class="dis_f_co_c_c bo_w mar_top2">
						<view class="black_f_36">{{info.todays_refund}}</view>
						<view class="grey_f_24 mar_top">今日退款(元)</view>
					</view>
					<view class="dis_f_co_c_c bo_w mar_top2">
						<view class="black_f_36">{{info.todays_refund_count}}</view>
						<view class="grey_f_24 mar_top">今日退款订单(笔)</view>
					</view>
					<view class="dis_f_co_c_c bo_w mar_top2">
						<view class="black_f_36">{{info.to_be_paid}}</view>
						<view class="grey_f_24 mar_top">待付款订单(笔)</view>
					</view>
				</view>
			</view>
		</view>
		<view class="list_b">
			<view class="list_b_a">
				<view class="list_b_title dis_f_sb_c">
					<view class="dis_f_l_c">
						<view class="xian back_blue"></view>
						<view class="black_f_32">常用供能</view>
					</view>
				</view>
				<view class="back dis_f_sb_c" @click="go_view('/pages-2/wd_lb/sp_gl')">
					<view class="dis_f_l_c">
						<image class="sp_img" :src="url+'/image/spgl.png'" mode=""></image>
						<view class="black_s_28">
							商品管理
						</view>
					</view>
					<image class="r_img" :src="url+'/image/right.png'" mode=""></image>
				</view>
				<view class="back dis_f_sb_c mar_top_30" @click="go_view('/pages-2/wd_lb/wd_qb')">
					<view class="dis_f_l_c">
						<image class="sp_img" :src="url+'/image/wdqb.png'" mode=""></image>
						<view class="black_s_28">
							我的钱包
						</view>
					</view>
					<image class="r_img" :src="url+'/image/right.png'" mode=""></image>
				</view>
			</view>
		</view>
		<image class="image" :src="url+'/image/zcxian.png'" mode=""></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				count: 5,
				value: 4.6,
				info: [],
				statistics: [],
				dete: '',
				url:''
			}
		},
		onLoad() {
			this.url=this.$.ajax_url3
			this.date = new Date().toISOString().slice(0,10)
		},
		onShow() {
			if (!this.$.get_data('token')) {
				this.$.open_new('/pages/mine/login')
				return
			}
			this.get_info()
		},
		methods: {
			get_info() {
				this.$.ajax(1, 'post', 'store/store/store_index', {}, (res) => {
					if (res.code == 200) {
						this.info = res.data
					} else {
						this.$.ti_shi(res.msg)
					}
				});
			},
			go_view(url) {
				uni.navigateTo({
					url: url
				})
				// uni.navigateTo({
				// 	url:'/pages/mine/login'
				// })
			}
		}
	}
</script>

<style lang="scss">
	.image {
		width: 750rpx;
		height: 40rpx;
		position: fixed;
		bottom: 24rpx;
		left: 0;
	}

	.r_img {
		width: 32rpx;
		height: 32rpx;
		margin-left: 8rpx;
	}

	.mar_top {
		margin-top: 8rpx;
	}

	.mar_top2 {
		margin-top: 30rpx;
	}

	.list_a {
		position: relative;

		.a_img {
			width: 750rpx;
			height: 400rpx;
			position: absolute;
			top: 0;
			left: 0;
		}

		.list_a_a {
			position: absolute;
			top: 88rpx;
			left: 32rpx;
			width: 686rpx;

			.a_text {
				margin-left: 16rpx;
			}

			.tx_img {
				width: 96rpx;
				height: 96rpx;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
			}

			.sz_img {
				width: 48rpx;
				height: 48rpx;
			}
		}

		.liat_a_b {
			display: flex;
			justify-content: space-around;
			margin-top: 40rpx;


		}
	}

	.list_b {
		width: 686rpx;
		// padding: 0 32rpx;
		position: relative;
		top: 460rpx;
		left: 32rpx;

		.list_b_a {
			margin-bottom: 40rpx;

			.list_b_title {
				margin-bottom: 24rpx;

				.xian {
					width: 4rpx;
					height: 32rpx;
					margin-right: 10rpx;
				}
			}
		}

		.list_b_bo {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;

			.bo_w {
				width: 210rpx;
			}
		}

		.sp_img {
			width: 64rpx;
			height: 64rpx;
			margin-right: 20rpx;
		}
	}
</style>